#ifndef __mqttapi_H
#define __mqttapi_H

#define MQTT_CALLBACK_SIGNATURE void (*callback)(char*,int, char*, int)
	

typedef enum{
	anonymous = 0,
	clientid,
	username,
}eAuthentication;


void mqtt_set_serverip(unsigned char ip[],unsigned int port);
void mqtt_set_user(const char *p_name,const char *p_pwd);
int  mqtt_connect(void);
char mqtt_is_connected(void);
int mqtt_disconnect(void);
int mqtt_publish(char *topick,char *message);
int mqtt_subscribe(char *topick);
void mqtt_loop(void);
void setCallback(void(*call_back)(char*,int, char*, int));


#endif
